<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>Document</title>
    <script src="../js/vue2.js"></script>
  </head>
  <body>
    <div id="app">
      <input
        @click="getVal(item.music)"
        type="button"
        v-for="(item,index) in music"
        :value="item.music"
      />
      <br />
      <span>{{ count }}</span>
      <!-- <img src="./images/avatar.jpg" alt="wee"> -->
      <!-- <span v-for='(item,index) in music'>{{item.music}}</span> -->
    </div>
  </body>

  <script>
    var Jie = new Vue({
      el: "#app",
      data: {
        music: [
          { music: "龙转风" },
          { music: "不能说的密码" },
          { music: "简单爱" },
          { music: "倒带" },
          { music: "双节棍" },
          { music: "霍元甲" },
          { music: "搁浅" },
          { music: "晴天" },
          { music: "七里香" },
          { music: "说好的幸福" }
        ],
        count: "123"
      },
      methods: {
        getVal(val) {
          this.count = val;
          //  this.count = this.input.value
        }
      }
    });
  </script>
</html>
